// @ts-ignore
/* eslint-disable */
import { request } from '@umijs/max';
const apiPrefix = '/web';

/** 评估数据加入月度报告 GET /diagnosis/report/addmonth */
export async function reportControllerAddMonth(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.reportControllerAddMonthParams,
  options?: { [key: string]: any },
) {
  return request<boolean>(`${apiPrefix}/diagnosis/report/addmonth`, {
    method: 'GET',
    params: {
      ...params,
    },
    ...(options || {}),
  });
}

/** 批量下载报告 GET /diagnosis/report/batch/download */
export async function reportControllerBatchDownloadReport(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.reportControllerBatchDownloadReportParams,
  options?: { [key: string]: any },
) {
  return request<any>(`${apiPrefix}/diagnosis/report/batch/download`, {
    method: 'GET',
    params: {
      ...params,
    },
    ...(options || {}),
  });
}

/** 检查报告是否生成 GET /diagnosis/report/check */
export async function reportControllerCheckReport(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.reportControllerCheckReportParams,
  options?: { [key: string]: any },
) {
  return request<API.ApiResult>(`${apiPrefix}/diagnosis/report/check`, {
    method: 'GET',
    params: {
      ...params,
    },
    ...(options || {}),
  });
}

/** 检查日期是否加入月度报告 GET /diagnosis/report/checkdate */
export async function reportControllerCheckAddMonth(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.reportControllerCheckAddMonthParams,
  options?: { [key: string]: any },
) {
  return request<API.ApiResult>(`${apiPrefix}/diagnosis/report/checkdate`, {
    method: 'GET',
    params: {
      ...params,
    },
    ...(options || {}),
  });
}

/** 下载报告 GET /diagnosis/report/download */
export async function reportControllerDownloadReport(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.reportControllerDownloadReportParams,
  options?: { [key: string]: any },
) {
  return request<any>(`${apiPrefix}/diagnosis/report/download`, {
    method: 'GET',
    params: {
      ...params,
    },
    ...(options || {}),
  });
}

/** 获取报告配置 GET /diagnosis/report/get/config */
export async function reportControllerGetConfig(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.reportControllerGetConfigParams,
  options?: { [key: string]: any },
) {
  return request<API.ReportConfig>(`${apiPrefix}/diagnosis/report/get/config`, {
    method: 'GET',
    params: {
      ...params,
    },
    ...(options || {}),
  });
}

/** 报告数据 获取报告数据列表 GET /diagnosis/report/list */
export async function reportControllerGetReportList(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.reportControllerGetReportListParams,
  options?: { [key: string]: any },
) {
  return request<API.Pagination>(`${apiPrefix}/diagnosis/report/list`, {
    method: 'GET',
    params: {
      ...params,
      search: undefined,
      ...params['search'],
      page: undefined,
      ...params['page'],
    },
    ...(options || {}),
  });
}

/** 生成月度报告 GET /diagnosis/report/monthreport */
export async function reportControllerCreateMonthReport(options?: { [key: string]: any }) {
  return request<API.ApiResult>(`${apiPrefix}/diagnosis/report/monthreport`, {
    method: 'GET',
    ...(options || {}),
  });
}

/** 保存报告配置 POST /diagnosis/report/save/config */
export async function reportControllerSaveConfig(
  body: API.ReportConfigReq,
  options?: { [key: string]: any },
) {
  return request<boolean>(`${apiPrefix}/diagnosis/report/save/config`, {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}

/** 在线查看报告 GET /diagnosis/report/view */
export async function reportControllerViewReport(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.reportControllerViewReportParams,
  options?: { [key: string]: any },
) {
  return request<any>(`${apiPrefix}/diagnosis/report/view`, {
    method: 'GET',
    params: {
      ...params,
    },
    ...(options || {}),
  });
}
